using DevExpress.XtraReports.UI;

namespace RitaReports.Training
{
    public partial class TrainingBySummaryViewer : XtraReport, IReportViewer
    {
        public TrainingBySummaryViewer()
        {
            InitializeComponent();
        }

        #region IReportViewer Members

        public XtraReport XtraReportControl
        {
            get { return this; }
        }

        public void UpdateReportViewer(IReportDataSource reportDataSource)
        {
            TrainingDataSource dataSource = (TrainingDataSource)reportDataSource;

            bindingSource1.DataSource = dataSource;
          
            CreateDocument();
        }

        #endregion
    }
}